 # x86_linux,x86_windows
PLATFORM = 
# c编译器
CC := gcc
# c++编译器
CXX := g++ -std=c++11
# 调试参数
DEBUG := -g -O0 
CFLAGS := $(DEBUG) -Wall -c 
RM := rm -rf

#ifeq 后面参数要叫$(), 因为是值引用, 值可以为数值或字符串

SRCS := $(wildcard ./*.c)
SRCS += $(wildcard ./src/*.c)
OBJS := $(patsubst %.c,%.o,$(SRCS))
INCLUDE_PATH := -I./include

# LIB_PATH := -L./libs-x86/
# LIBS := -lgdi32
# DEFINE := -Dwindows
TARGET = main


$(TARGET) : $(OBJS)
	$(CC) $^ -o $@ $(LIB_PATH) $(LIBS) $(INCLUDE_PATH) $(DEFINE)

$(OBJS) : %.o : %.c
	$(CC) $(CFLAGS) $< -o $@ $(INCLUDE_PATH) $(DEFINE)

.PHONY:clean all
clean:
	$(RM) $(TARGET) *.o ./src/*.o



